/*
* berton
*/
package com.pitop.material.api;

import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.*;
import java.util.List;

import com.pitop.material.entity.Material;

/**
 * 供应料材 api请求熔断器
 * @author berton
 */
@FeignClient(value = "pps-cloud-demo-provider", fallback = MaterialFeignApiImpl.class)
public interface MaterialFeignApi {
    /**
     * 查询Material一个详情信息
     * @param id 
     * @param code 编码
     * @param suppierCode 供应商编码
     * @return BeanRet
     */
    @GetMapping(value = "/material/load")
    Material load(@RequestParam("id") java.lang.Long id,@RequestParam("code") java.lang.String code,@RequestParam("suppierCode") java.lang.String suppierCode);


    /**
     * 根据条件id查询Material一个详情信息
     *
     * @param id 
     * @return BeanRet
     */
    @GetMapping(value = "/material/load/id/{id}")
    Material loadById(@RequestParam("id") java.lang.Long id);


    /**
     * 根据条件code查询Material一个详情信息
     *
     * @param code 编码
     * @return BeanRet
     */
    @GetMapping(value = "/material/load/code/{code}")
    Material loadByCode(@RequestParam("code") java.lang.String code);


    /**
     * 根据条件suppierCode查询Material一个详情信息
     *
     * @param suppierCode 供应商编码
     * @return BeanRet
     */
    @GetMapping(value = "/material/load/suppierCode/{suppierCode}")
    Material loadBySuppierCode(@RequestParam("suppierCode") java.lang.String suppierCode);

    /**
     * 删除Material
     *
     * @return BeanRet
     */
    @DeleteMapping("/material/delete")
    void delete(@RequestParam("id") java.lang.Long id,@RequestParam("code") java.lang.String code,@RequestParam("suppierCode") java.lang.String suppierCode);


    /**
     * 查询Material信息集合
     *
     * @return 分页对象
     */
    @PostMapping(value = "/material/list")
    List<Material> list(@RequestBody Material material,@RequestParam("curPage") int curPage,@RequestParam("pageSize") int pageSize);


    /**
     * 查询Material信息集合
     *
     * @return 分页对象
     */
    @GetMapping(value = "/material/list/by")
    List<Material> listByPk(@RequestParam("id") java.lang.Long id,@RequestParam("code") java.lang.String code,@RequestParam("suppierCode") java.lang.String suppierCode,@RequestParam("curPage") int curPage,@RequestParam("pageSize") int pageSize);




    /**
    * 统计Material信息数量根据主键
    *
    * @return 总条数
    */
    @GetMapping(value = "/material/count/by")
    Integer count(@RequestParam("id") java.lang.Long id,@RequestParam("code") java.lang.String code,@RequestParam("suppierCode") java.lang.String suppierCode);

    /**
    * 统计Material信息数量
    *
    * @return 总条数
    */
    @PostMapping(value = "/material/count")
    Integer count(@RequestBody Material material);



    /**
     * 创建Material
     *
     * @return BeanRet
     */
    @PostMapping("/material/build")
    Material build(@RequestBody Material material);


    /**
     * 修改Material
     *
     * @return BeanRet
     */
    @PutMapping("/material/modify")
    Material modify(@RequestBody Material material);



}
